<template>
  <el-dialog
    title="添加测试用例"
    :visible.sync="dialogFormVisible"
    :before-close="handleClose"
  >
    <el-card shadow="nerver">
      <el-form :inline="true">
        <el-form-item label="测试用例名称名称">
          <el-input size="mini" v-model="nameInput"></el-input>
        </el-form-item>
        <el-form-item>
          <el-button size="mini" type="primary">查询</el-button>
        </el-form-item>
        <el-form-item>
          <el-button size="mini" type="primary" @click="addCaseClick()"
          >添加
          </el-button
          >
        </el-form-item>
      </el-form>

      <div>
        <!-- <el-button size="mini" type="primary" @click="openTc" style="margin-bottom :20px">新增接口</el-button> -->
        <el-table
          :data="newApiList.data.list"
          border
          @selection-change="handleSelectionChange"
          size="mini"
        >
          <el-table-column type="selection" width="55"></el-table-column>
          <el-table-column
            type="index"
            label="序号"
            width="80"
            align="center"
          ></el-table-column>
          <el-table-column
            prop="name"
            label="用例名称"
            width="300"
            align="center"
          ></el-table-column>
          <el-table-column
            prop="remark"
            label="用例描述"
            align="center"
          ></el-table-column>
          <el-table-column
            prop="createTime"
            label="创建时间"
            width="300"
            align="center"
            :formatter="formatter"
          ></el-table-column>
        </el-table>
        <el-pagination
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
          layout="total,sizes,prev,pager,next,jumper"
          :page-sizes="[5, 10, 15, 20]"
          :page-size="newApiList.data.pageSize"
          :current-page="newApiList.data.pageNamber"
          :total="newApiList.data.total"
          style="float: right; margin-top: 10px; margin-bottom: 10px"
        >
        </el-pagination>
      </div>
    </el-card>
  </el-dialog>
</template>
<script>
  import AddTestCasePage from "./AddTestCasePage";
  export default AddTestCasePage;
</script>
